/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package demo1014;

import demo1012.*;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;

/**
 *
 * @author Administrator
 */
public class FileWriterDemo1 {

    public static void main(String args[]) {
        try {
            FileWriter fw = new FileWriter("e:/data3.txt");
            int x = 0;
            for(int i=1;i<=10000000;i++){
            fw.write(i+"\r\n");
            }
            fw.close();

        } catch (FileNotFoundException e) {
            System.out.println("file not found");


        } catch (IOException e) {
             System.out.println("io error");
        }

    }
}
